package models

import "gorm.io/gorm"

type New struct {
	gorm.Model
	Title   string `gorm:"type:varchar(20)" json:"title"`
	Name    string `gorm:"type:varchar(10)" json:"name"`
	Address string `gorm:"type:varchar(20)" json:"address"`
	Img     string `gorm:"type:varchar(120)" json:"img"`
}

func (c *New) Add() error {
	return DB.Create(&c).Error
}
func (c *New) Del() error {
	return DB.Delete(&c).Error
}
